﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Forms;
using System.IO;
using mshtml;

namespace ITKRestaurant
{
    /// <summary>
    /// Interaction logic for SzamlazoGUI.xaml
    /// </summary>
    public partial class SzamlazoGUI : Window
    {
        string szamla = null;


        public SzamlazoGUI(string szamla)
        {
            this.szamla += "<body><head>";
            this.szamla += "<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'>";
            this.szamla += "</head>";
           
            this.szamla += szamla;

            this.szamla += "</body>";
            InitializeComponent();
            initBrowser();
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            ((HTMLDocument)webBrowser1.Document).execCommand("Print", true);

        }

        public void initBrowser()
        {
            webBrowser1.NavigateToString(this.szamla);
        }

        
    }
}
